// Generator 生成器函数也实现了iterable接口
/* function* foo() {
  console.log("zce");
  return 100;
}

const r = foo();
console.log(r, r.next()); */

function* foo() {
  console.log("1111");
  yield 100;
  console.log("222");
  yield 200;
  console.log("333");
  yield 300;
}

const g = foo();
console.log(g.next());
console.log(g.next());
console.log(g.next());
console.log(g.next());
